home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FishMarket 1.0
/
FishMarket v1.0.iso
/
fishies
/
451-475
/
disk_451
/
convert
/
convert.doc
< prev
next >
Wrap
Text File
|
1992-05-06
|
10KB
|
239 lines
===========================================================
Convert.doc - for v1r6 - last updated November 15th, 1990
===========================================================
Credits:
--------
Software created by Pete Patterson for Black Belt Systems
Additional coding by Ben Williams
Documentation written by Ben Williams
Funding by Black Belt Systems
Project: HAM-E hardware support
Program revisions from version 1.0 to date:
===========================================
v1r6 - Fixed bug causing crashes if memory allocation failed
- Intergerized scaling for approximately 7x speed improvement
v1r5 - Fixed bug in loading 24 bit files that appeared in v1r4
- Added load of IBM (yech!) Dpaint "LBM" files
- Added load of IBM DPaint non-LBM files (recent DPaint versions)
- Added "shuffle" features to convert from and to X-Spex
compatible 3-d interleaved images
v1r4 - Added support for 18 bit IFF "ScanLab" files
- Added Support for Black Belt paint UPB8 (UnPackedBrush-8) brushes
v1r3 - Added HAM-E ham and reg mode single and multi field loaders
v1r2 - Added ability to read one type of targa file ("Opticks" generated)
v1r1 - Fixed bug in loading RGB8 and RGN files in v1r0
- Added scaling options (-px, -py, -%x, -%y)
v1r0 - Initial release version.
Introduction:
-------------
The convert tool was created to fill a specific need of the Black Belt
Systems HAM-E product customer base. The HAM-E is a graphics device
which can display color information far more accurately than the Amigas
built in graphics capabilities allow. As such, the HAM-E display
formatting software takes as input CBM standard 24 bit IFF files, the
format defined by CBM specifically for this type of use.
Unfortunately, many otherwise powerful Amiga products such as Impulses
Turbo Silver, Byte by Bytes Sculpt series and some of the PD ray trace
products don't save standard files; instead, they save raw files,
or partially (sometimes totally!) non-conformant "other" formats, some
of which they consider proprietary.
Certain other software products often save image formats that are
designed to take advantage of various features in the Amiga's graphics
system that allow enhancement of certain image modes. HAM-E, SHAM and
Dynamic HiRes are examples of this type of image file. ASDGs "The Art
Department" saves 24 bit files with special chunks in them called
"CLUT" chunks that modify the 24 bit data in various ways. All of these
differing image file formats bring chaos to our supposedly orderly
"standard image format" environment.
The convert tool is able to read many of these file formats, optionally
scale the input file to a new size for output, and write it out as a
completely standard, "100% vanilla" 24 bit IFF file as per the CBM
specification. Once this is done, the resulting file can be sent to the
HAM-E render software, or any other Amiga tool that can read 24 bit IFF.
The convert tool has been made available free of charge to our
customers as a service to them. Use by other parties is allowable as
well.
Use of Convert:
---------------
There are basically two types of image files that convert supports.
First, we have "unified" image files. These are files where all of the
iamge information is contained in one file, with enough other
information to allow the convert tool to identify the file type and
then act accordingly. The other is "raw" individual RGB files, where
three individual files make up the complete image; and there is no
information in these files to help the tool know what the file type is,
or what its resolution is, and so on.
Unified Image File Use:
-----------------------
This consists of simply specifying an input and an output file:
1> convert -i input_file -o output_file
This will take the input file and create a 24 bit IFF output file of
the same resolution. The filenames may be presented in any order, as
long as they are preceeded by the "-i" and "-o" switches. Note that for
Targa format files, you must specify the -t flag anywhere on the command
line. The width and height of the image is stored within the Targa file,
but there is nothing in a Targa format file which identifies it as such.
Raw Image File Use:
-------------------
For any raw RGB file triplet, the "-i" option is not used. Instead,
there are five (5) required command line switches that tell the convert
software how to deal with this image. You must provide the names of
each of the three raw files, as well as the horizontal and vertical
resolution of the image contained in these files. Here is an example:
1> convert -r file1 -g file2 -b file3 -x 320 -y 400 -o output_file
The parameters may be presented in any order, as long as all five of
the -o, -r, -g, -b, -x, and -y switches are present.
Optional Output Scaling:
------------------------
For either unified file types or raw RGB files, you have the option to
scale the output file. You can do this as a percentage of input size,
or to specific X:Y output requirements, or a mixture of both
techniques. For the examples we'll use the unified form of the command
since it's shorter and a little easier to understand; but these scaling
options may also be applied in exactly the same way to raw RGB file
conversion operations. Here are some examples:
1> convert -i infile -o outfile -%x 50
This will scale the X axis to 50% of the original size. Since there is
no scale specification for the Y axis, it will remain the original
size.
If you need to scale both axis to 50%, then you specify that for both:
1> convert -i infile -o outfile -%x 50 -%y 50
You can specify the output size directly in pixels, as well. The
following example will create a 320x400 output, regardless of the size
of the input file:
1> convert -i infile -o outfile -px 320 -py 400
And this will scale the x axis to 50% of it's original size while
ensuring a 200 line vertical size:
1> convert -i infile -o outfile -%x 50 -py 200
You can mix and match percent and specific X and Y options as needed;
don't use a percentage and a specific pixel specification for the same
axis.
The scaling options also allow enlargement. For percentages, just
specify values greater than 100; for pixel sizes, if the output size is
larger than the input file size, then the output file will be enlarged
in that dimension or dimensions. Here's an example:
1> convert -i infile -o outfile -%x 200 -%y 200
Unified Image File Formats Supported:
-------------------------------------
1 - 2 color IFF images
2 - 4 color IFF images
3 - 8 color IFF images
4 - 16 color IFF images
5 - 32 color IFF images
6 - 64 color "half-bright" IFF images
7 - 64 color HAM-E register mode single field images
8 - 64 color HAM-E register mode dual field images
9 - 128 color HAM-E register mode single field images
10 - 128 color HAM-E register mode dual field images
11 - 128 color IFF images
12 - 192 color HAM-E register mode single field images
13 - 192 color HAM-E register mode dual field images
14 - 256 color IFF images
15 - 256 color GIF images
16 - 256 color HAM-E register mode single field images
17 - 256 color HAM-E register mode dual field images
18 - 256 color HAM-E UPB8 brushes
19 - 4096 color photon paint IFF images
20 - 4096 color photon paint IFF brushes
21 - 4096 color DigiPaint IFF images
22 - 4096 color DigiPaint IFF brushes
23 - 4096 color Dynamic HiRes images
24 - 4096 color ARZ0 images ("TAD")
25 - 4096 color ARZ1 images ("TAD")
26 - 4096 color AHAM images ("TAD")
27 - 4096 color SHAM images ("info")
28 - 4096 color RGBN images ("Silver")
29 - 262144 color HAM-E ham mode single field images
30 - 262144 color HAM-E ham mode single field, multi-bank images
31 - 262144 color HAM-E ham mode dual field images
32 - 262144 color HAM-E ham mode dual field, multi-bank images
33 - 262144 color "ScanLab" 18 bit IFF files
34 - 16 million color RGB8 ("Silver")
35 - 16 million color 24-bit IFF images with CLUT chunks ("TAD")
36 - 16 million color 24-bit IFF images
37 - 16 million color QRT Trace files
38 - 16 million color DKB Trace files
39 - 16 million color TARGA files (Opticks)
Available Command Line Switches:
================================
For Help
--------
? ...for list of options
h ...for list of options
-h ...for list of options
help ...for list of options
For Specifying a Unified Input File:
------------------------------------
-i [dev:dir/file] ...unified input file (may include path)
For Specifying Targa Input:
---------------------------
-t ...use -i for Targa file name
For Specifying raw RGB Input Files (All these switches are required):
---------------------------------------------------------------------
-r [dev:dir/file] ...raw red file (may include path)
-g [dev:dir/file] ...raw green file (may include path)
-b [dev:dir/file] ...raw blue file (may include path)
-x [width] ...raw source width
-y [height] ...raw source height
For Specifying the Output File (Required):
------------------------------------------
-o [dev:dir/file] ...24 bit output file (may include path)
For Scaling the output file to a percentage of the input file:
--------------------------------------------------------------
-%x [% value] ...destination image width
-%y [% value] ...destination image height
For Scaling the output file to a specific Pixel Width:
------------------------------------------------------
-px [pixel value] ...destination image width
-py [pixel value] ...destination image height
To change an "over-under" X_Spex image to "Interleaved":
--------------------------------------------------------
-3d ...takes over-under, makes interleaved
To change an "Interleaved" X_Spex image to "over-under":
--------------------------------------------------------
-2d ...takes interleaved, makes over-under